/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package CarProject.impl;

import CarProject.Action;
import CarProject.CarProjectPackage;
import CarProject.VueGenerale;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Action</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link CarProject.impl.ActionImpl#getRetour <em>Retour</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public abstract class ActionImpl extends EObjectImpl implements Action {
	/**
	 * The cached value of the '{@link #getRetour() <em>Retour</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getRetour()
	 * @generated
	 * @ordered
	 */
	protected VueGenerale retour;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected ActionImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected EClass eStaticClass() {
		return CarProjectPackage.Literals.ACTION;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public VueGenerale getRetour() {
		if (retour != null && retour.eIsProxy()) {
			InternalEObject oldRetour = (InternalEObject)retour;
			retour = (VueGenerale)eResolveProxy(oldRetour);
			if (retour != oldRetour) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, CarProjectPackage.ACTION__RETOUR, oldRetour, retour));
			}
		}
		return retour;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public VueGenerale basicGetRetour() {
		return retour;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setRetour(VueGenerale newRetour) {
		VueGenerale oldRetour = retour;
		retour = newRetour;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, CarProjectPackage.ACTION__RETOUR, oldRetour, retour));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case CarProjectPackage.ACTION__RETOUR:
				if (resolve) return getRetour();
				return basicGetRetour();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case CarProjectPackage.ACTION__RETOUR:
				setRetour((VueGenerale)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void eUnset(int featureID) {
		switch (featureID) {
			case CarProjectPackage.ACTION__RETOUR:
				setRetour((VueGenerale)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case CarProjectPackage.ACTION__RETOUR:
				return retour != null;
		}
		return super.eIsSet(featureID);
	}

} //ActionImpl
